/**
 * @FileName ConcreteAgregate.java
 * @Package com.designMode.iterator
 * -------------------------------------
 * @function Please write description of function
 * @Date 2016-1-18 上午11:46:43
 * -------------------------------------
 * Copyright (c) 2016,顾博君 All Rights Reserved.
 */
package com.designMode.iterator;

import java.util.Vector;

/**
 * @author 顾博君
 * @ClassName ConcreteAgregate
 * @Date 2016-1-18 上午11:46:43
 * @Function 具体容器
 */
public class ConcreteAgregate implements Agregate {
    private Vector<Object> vector = new Vector<>();

    @Override
    public Iterator iterator() {
        return new ConcreteIterator(this.vector);
    }

    @Override
    public void add(Object o) {
        this.vector.add(o);
    }

    @Override
    public void remove(Object o) {
        this.vector.remove(o);
    }
}
